<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Add New Transaction</title>

<style type="text/css">

.formLabel {
	font-weight: bold;
}
.formTable {
	border: 1px solid black;
	
}
legend {
	font-weight: bold;
	font-size: 1.2em;
}

</style>
</head>
<body>
<fieldset title="Add New Transaction" >
	<legend align="left" >Add New Transaction</legend>
	<form:form commandName="stockTransactionForm" >
	<table class="formTable" cellspacing="2px" cellpadding="2px">
		<tr>
			<td>
				<form:label path="partNumber" cssClass="formLabel">Part Number</form:label>
			</td>
			<td>
				<form:input path="partNumber"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="assignmentNumber" cssClass="formLabel">Assignment Number</form:label>
			</td>
			<td>
				<form:input path="assignmentNumber"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="grnNumber" cssClass="formLabel">GRN Number</form:label>
			</td>
			<td>
				<form:input path="grnNumber"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="assignmentDate" cssClass="formLabel">Assignment Date</form:label>
			</td>
			<td>
				<form:input path="assignmentDate"/>
			</td>
			<td>
				<span class="formNotes">(dd-MM-yyyy format)</span>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="receiptDate" cssClass="formLabel">Receipt Date</form:label>
			</td>
			<td>
				<form:input path="receiptDate"/>
			</td>
			<td>
				<span class="formNotes">(dd-MM-yyyy format)</span>
			</td>		
		</tr>		
		<tr>
			<td>
				<form:label path="invoiceNumber" cssClass="formLabel">Invoice Number</form:label>
			</td>
			<td>
				<form:input path="invoiceNumber"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="invoiceDate" cssClass="formLabel">Invoice Date</form:label>
			</td>
			<td>
				<form:input path="invoiceDate"/>
			</td>
			<td>
				<span class="formNotes">(dd-MM-yyyy format)</span>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="vendorCode" cssClass="formLabel">Vendor Code</form:label>
			</td>
			<td>
				<form:input path="vendorCode"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="purchaseType" cssClass="formLabel">Purchase Type</form:label>
			</td>
			<td>
				<form:select path="purchaseType" items="${purchaseTypeMap }">
				</form:select>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="transactionType" cssClass="formLabel">Transaction Type</form:label>
			</td>
			<td>
				<form:select path="transactionType" items="${transactionTypeMap}"> 
				</form:select>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="accountType" cssClass="formLabel">Account Type</form:label>
			</td>
			<td>
				<form:select path="accountType" items="${accountTypeMap}"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="quantity" cssClass="formLabel">Quantity</form:label>
			</td>
			<td>
				<form:input path="quantity"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="unitRate" cssClass="formLabel">Unit Rate</form:label>
			</td>
			<td>
				<form:input path="unitRate"/>
			</td>
		</tr>		
		<tr>
			<td>
				<form:label path="value" cssClass="formLabel">INR Value</form:label>
			</td>
			<td>
				<form:input path="value"/>
			</td>
		</tr>		
		<tr>
			<td colspan="3" align="center">
				<input type="button" value="Save" >
			</td>
		</tr>		
	</table>
	</form:form>
</fieldset>
</body>
</html>